MyUserPaneBackgroundProc
NEW WITH THE APPEARANCE MANAGER
Sets the background color or pattern (only for user panes that support embedding).The Control Manager declares the type for an application-defined user pane focus function as follows:
typedef pascal (*ControlUserPaneBackgroundProcPtr)( ControlHandle control, ControlBackgroundPtr info);The Control Manager defines the data typeControlUserPaneBackgroundUPP
to identify the universal procedure pointer for this application-defined function:
typedef UniversalProcPtr ControlUserPaneBackgroundUPP;You typically use theNewControlUserPaneBackgroundProc
macro like this:
ControlUserPaneBackgroundUPP myControlUserPaneBackgroundUPP; myControlUserPaneBackgroundUPP = NewControlUserPaneBackgroundProc (MyUsePaneBackground);You typically use theCallControlUserPaneBackgroundProc
macro like this:
CallControlUserPaneBackgroundProc(myControlUserPaneBackgroundUPP, control, info);Here's how to declare the functionMyUserPaneBackgroundProc:
pascal void MyUserPaneBackgroundProc ( ControlHandle control ControlBackgroundPtr info);
control
- A handle to the control for which the background color or pattern is to be set.
info
- A pointer to information such as the depth and type of the drawing device.
DISCUSSION
YourMyUserPaneFocusProc
function should set the user pane background color or pattern to whatever is appropriate given the bit depth and device type passed in.This function will only get called if you've set the
kControlHasSpecialBackground
andkControlSupportsEmbedding
feature bits on creation of the user pane control. Once you have created the functionMyUserPaneBackgroundProc
, passkControlUserPaneBackgroundProcTag
in thetagName
parameter ofSetControlData
.